package Demo3;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Student student = new Student("zhangsan",18);
        System.out.println(student.toString());
        Student clone = (Student) student.clone();
        System.out.println(clone.toString());

        student.setiDcard(100);

        //浅拷贝
        System.out.println(clone.toString());
        System.out.println(student.toString());


        System.out.println(clone.equals(student));
        System.out.println(clone == student);

    }
}
